home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
maximus
/
maxkit20.zip
/
WIDLST20.ZIP
/
WIDLST20.MEX
next >
Wrap
Text File
|
1996-02-07
|
3KB
|
95 lines
//////////////////////////////////////////////////////////////////////////////
// Free for non-commercial use. FREQ MAXKIT for new Sysop set.
// Desc: changed to print list or both, Gerry Ellison 1:108/107
// Copyright 1995 1996 rry Ellison. All rights reserved.
// $Id: WIDLST20.MEX 1.5 1996/1/1 24:00:00 gre Exp $
// USAGE: [mex]M\WIDLST20.MEX, for unattended list printing.
//////////////////////////////////////////////////////////////////////////////
#include <max.mh>
int main()
{
int: ok,
i,
fd;
string: line,
bbsname,
path_file,
z;
char: nonstop,
ch;
struct _usr: u;
reset_more(nonstop);
// -----------------------------------------------------
// put the path and file name "C:\\BBS\\Logs\\WUSER.LST"
path_file := "C:\\Max\\WUSER.LST";
// -----------------------------------------------------
bbsname := " From The Mountain Top BBS! 1:108/107";
print("\f ░░░░░▒▒▒▒▒▓▓▓▓▓█████████ WIDELST1.MEX █" +
"████████▓▓▓▓▓▒▒▒▒▒░░░░░\n");
print(COL_YELLOW, "\n" + bbsname +"\n");
print(COL_LGREEN "\n Using NAME, LOCATION, PHONE, PRIV, UPLOAD, DNLOAD, LASTCALLED, #CALLS\n");
line := strpadleft("Total number of users = ",49,' ') +
ltostr(userfilesize());
print(line + "\n");
print(COL_LCYAN "\n Creating " + path_file + " USER # " + COL_YELLOW);
fd := open(path_file, IOPEN_CREATE | IOPEN_WRITE);
line := "\n" + strpadleft("The Mountain Top BBS Userlist.",54,' ');
writeln(fd, line);
line := strpadleft("Total number of users = ",49,' ') +
ltostr(userfilesize());
writeln(fd, line);
line := "\n NAME LOCATION PHONE PRIV " +
"UPLOAD DNLOAD LASTCALLED #CALLS\n";
writeln(fd, line);
i := 1;
for (ok := userfindopen("","",u);
ok AND do_more(nonstop, COL_CYAN);
ok := userfindnext(u))
{ // start through list
if (i >0 and i <10)
z := "\b";
if (i >10 or i >100)
z := "\b\b";
if (i >100)
z := "\b\b\b";
print(z,i);
i := i + 1;
line := strpad(u.name,22,' ') +
strpad(u.city,32,' ') +
strpad(u.phone,14,' ') +
" " + strpad(uitostr(u.priv),4,' ') +
" " + strpad(uitostr(u.up),9,' ') +
" " + strpad(uitostr(u.down),9,' ') +
substr(stamp_string(u.ludate),1,10) +
" " + strpad(uitostr(u.times),9,' ');
writeln(fd, line);
}
line := "\n" + " -----------------------------------"
+ "---------------------------------------";
writeln(fd, line);
close(fd);
print("\n\n");
return 0;
}